<?php
require_once 'script/Application.php';
require_once 'script/XMLFile.php';
$fichier=$_GET['file'];
$directory='files\\';
$file=$directory.$_GET['file'];
$xml=new XML($file);
$xml->load_File();
$nbNoeuds=$xml->nombreSituations('//cas/etape/situation');
?>

<div id="admin_header">
 <div class="admin_editoffer_title">Consultation du fichier: <?php echo $_GET['file'];?> </div>
 </div>
<div id="admin_header_border"></div>
<div id="admin_search_tab">
<form>
	<label class="search" style="padding-top:3px;">afficher: </label>
	<label class="search">
	<select id="etape" name="etape" onchange="choixAffichage('<?php echo $fichier ?>')">
		<option value="toute">toutes les etapes</option>';
			<?php
				$i=0;
				for($i;$i<$nbNoeuds;$i++){
				$j=$i+1;
				echo'<option value="'.$j.'">etape '.$j.'</option>';
				}
			?>	
		</select>
		<select id="contenu" name="contenu" onchange="choixAffichage('<?php echo $fichier ?>')">
			<option value="rien">aucun</option>
			<option value="tout">etapes,reponses,questions</option>
			<option value="noms">noms </option>
			<option value="questions">questions</option>
			<option value="reponses">reponses</option>
		</select>
	
	</label>
</form>
</div>	
 <div class="add_tab">	
            <div class="form_contact">
					<div id="div"></div>    
			</div>
 </div>
	<?php
		if(isset($erreur)){
			echo'<div class="admin_footer_help">';
			echo $erreur;
			echo'</div>';
		}
	?>

<script type="text/javascript" src="js/consultation.js"></script>